package nevo.core;

import java.util.*;

/**
 * An objective function is a real-valued function that the
 * {@link Optimizer} tries to minimize. 
 * 
 * @author mschachter
 * 
 */
public interface ObjectiveFunction
{
	/**
	 * Compute the value of this objective function given the
	 * output of a {@link Model}'s output, which is in the form
	 * of a Map<String,Object>.
	 * 
	 * @param modelOutput The output of a model, hopefully one that
	 * 		  the implementation of this model understands...
	 * @return A real number determining how optimal "input" is - the lower the number
	 * 		   the more optimal.
	 * @throws Exception
	 */
	public double compute(Map<String, Object> modelOutput) throws Exception;
}
